<%-- 
    Document   : FormOrder
    Created on : Nov 1, 2012, 9:45:53 AM
    Author     : admin
--%>

<%@page contentType="text/html" pageEncoding="UTF-8"%>
<jsp:useBean id="pesanan" scope="application" class="bean.Pemesan"/>
<!DOCTYPE html>
<html>

    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
        <title>Form Order</title>
        <SCRIPT LANGUAGE="JavaScript">
            <!--
            function validate(){
                submitOK="True"
                x=document.form1

                name=x.nama.value
                if (name.length==0)
                {
                    alert("Nama Harus  Diisi")
                    submitOK="False"
                }
                else if (name.length>30) {
                    alert("nama tidak boleh > 30 karakter.")
                    submitOK="False"
                }

                almt=x.alamat.value
                if (almt.length==0)
                {
                    alert("Alamat harus diisi.")
                    submitOK="False"
                }
 
                ntelp=x.telp.value
                if (ntelp.length==0)
                {
                    alert("No telepon harus di isi .")
                    submitOK="False"
                }
 
 
                //validasi radiobutton
                var counter=0;
                jk=x.gender.length;
                for (i=0; i < jk; i++) {
                    if (x.gender[i].checked) counter++;
                }

                if(counter==0) {alert("Choose one gender")};
                //validasi radiobutton
 
 
                //validasi check box
                cekbayar=x.bayar.length;
                for (i=0; i < cekbayar; i++) {
                    if (x.bayar[i].checked) counter++;
                }

                if(counter==0) {alert("Choose one payment")};
                //validasi check box
 


                // This is the Third Validation 
                emailattherate=x.email.value.indexOf("@")
                
        
                if (emailattherate==-1) 
                {
                    alert("Invalid E-mail / Email False")
                    submitOK="False"
                }
                if (submitOK=="False") 
                {
                    return false
                }
                var counter2=0;
                jk=x.bayar.length;
                for (i=0; i < jk; i++) {
                    if (x.gender[i].checked) counter2++;
                }

                if(counter2==0) {alert("Choose one payment")};
            }
            -->
        </SCRIPT>
    </head>

</head>
<body>
    <style type="text/css">
        #main{
            border: solid;
            color: blue;
            background:white;
            font-weight: bold;
            margin-top: 100px;
            margin-left:120px;
            margin-right:127px;
            margin-bottom:135px;
            padding-right:60px; }

        #menuhor {
            list-style-type: none;
            margin: 0;
            padding: 0;
            float: center;
        }

        #menuhor li {
            margin: 0;
            padding: 0;
            float:left;
            text-align : center;
        }

        #menuhor a {
            display: block;
            width : 247px;
            color: #FFF;
            float : center;
            text-decoration: none;
            line-height:2.5;
            border-right: 3px solid white;
        }

        #menuhor a:hover {
            background: cyan;
        }
        #konten_utama{
            background-color:white;}

        #menuver{
            list-style-type: none;
            margin-left:-40px;
            margin-right:30px;
            padding:0;
            width : 170px;
            background-color:white;
            float:left;
        }
        #menuver li {
            margin:0;
            padding:0;
            float:center;
            text-align : center;
        }
        #menuver a {
            display:block;
            color:#FFF;
            text-decoration:none;
            padding:0.15px;
            line-height: 2.5;
            border-bottom: 3px solid white;
        }
        #menuver a:hover {
            background: cyan;
        }
        #footer{
            font-size: 14px;
            border: solid;
            color: blue;
            clear:both;
            text-align: center;
            background: white;
            margin-top: 500px;
            margin-bottom: 50px;
            height:70px;
            width :950px;
            float:center;

        }
        #konten{
            float:left;

            color: black;
            background: white;
            height:400px;
            width :730px
        }


    </style>
<body background ="background1.jpg">
    <ul id="main">
        <FORM   NAME="form1" onSubmit="return validate()" action="halamanKonfirmasi.jsp" method="post"> 
            <center><img src="banner.jpg"width="1000" height="300">

                <br>
                <br>
                <ul id="menuhor" style="position:absolute;right:7px;left:173px;top:345px">
                    <font face="Comic sans MS">
                    <li><a href="HalamanUtama.jsp"><font color="Blue">Home</a> </li>
                    <li><a href="HalamanProfile.jsp"><font color="Blue">Profile</a></li>
                    <li><a href="HalamanWisata.jsp"><font color="Blue">Wisata</blink></a></li>
                    <li><a href="FormOrder.jsp"><font color="Blue">Order</a></li>
                </ul><br><br><hr>

                <ul id="konten_utama">

                    <ul id="menuver">
                        <center> Klik the link below to view packet travel</center>
                        <br>
                            <li><a href="HalamanWisata.jsp"><Marquee><font color="Blue">view packet travel </Marquee></a> </li>
                            <br>
                            
                    </ul>

                    <ul id="konten">
                        <h2>FORM ORDER</h2>
                        Silakan isi data dibawah ini sesuai dengan kartu identitas</br>

                        <table class="p_align" cellspacing="5">
                            <tr>
                                <td>ID Pesanan</td>
                                <td><input type="text" name="idpesanan" value="<%= pesanan.ID_Pemesan() %>" size="20"></td>
                            </tr>
                            <tr>
                                <td>Name</td>
                                <td><INPUT  TYPE="text" NAME="nama" size="30"> *</td>
                            </tr>
                            <tr>
                                <td>address</td><td>
                                    <INPUT TYPE="text" NAME="alamat"> *</td> 
                            </tr>
                            <tr>
                                <td>No telp</td>
                                <td><INPUT TYPE="text" NAME="notlp"> *</td>
                            </tr>
                            <tr>
                                <td>Email</td>
                                <td valign="top"><INPUT TYPE="text" NAME="email"> *</td>
                            </tr>
                            <tr>
                                <td>tanggal berangkat</td>
                                <td>
                                    <SELECT NAME="tanggal">
                                        <OPTION>12-12-2012</OPTION>
                                        <OPTION>2-12-2012</OPTION>
                                        <OPTION>3-12-2012</OPTION>
                                        <OPTION>4-12-2012</OPTION>
                                       
                                      
                                    </SELECT>	
                            
                                </td>
                            <tr>
                                
                                <td>Gender</td>
                                <td>
                                    <input name="gender" type="radio" value="l"> 
                                    Men </br> 
                                    <input name="gender" type="radio" value="p"> 
                                    Women
                                </td>
                            </tr>
                            <tr>
                                <td>Packet</td>
                                <td>
                                    <SELECT NAME="paket">
                                        <OPTION value="Paket1">Paket 1</OPTION>
                                        <OPTION value="Paket2">Paket 2</OPTION>
                                        <OPTION value="Paket3">Paket 3</OPTION>
                                        <OPTION value="Paket4">Paket 4</OPTION>
                                        <OPTION value="Paket5">Paket 5</OPTION>
                                        
                                    </SELECT>
                                </td>
                            </tr>
                            

                                    </table>
                            </tr>
                        </table>
                        </BR>
                        <INPUT TYPE="submit" VALUE="Order">   


                        <INPUT TYPE="reset" VALUE="Reset">
                        </FORM>
                        <font color="red"><marquee><i> thank you for order </i></marquee></font>

                        </select>
                        </pre>


                    </ul>
                    <br>
                    

                    <ul id="footer">

                        Queries Executed: 0 queries | Page Generation Time: 0.00265 seconds <br>
                        Travel Agent 2.0.4 Beta 10 (Revision 363). Coded by Ardy. Skin coded by Amel and designed by Fave, Hohok
                        All registered trademarks belong to their respective owners. Travel Agent Online and all related content are trademark of Gravity CO. Ltd.
                    </ul>

                    </body>
                    </html>
